package board;

public class HighlightRequest {
    protected Object requestingObject;
    protected HighlightType highlightType;

    @Deprecated
    protected HighlightRequest() {}

    public HighlightRequest(Object requestingObject, HighlightType highlightType) {
	this.requestingObject = requestingObject;
	this.highlightType = highlightType;
    }

    public HighlightType getHighlightType() {
	return highlightType;
    }

    public void setHighlightType(HighlightType highlightType) {
	this.highlightType = highlightType;
    }

    public Object getRequestingObject() {
	return requestingObject;
    }

    public void setRequestingObject(Object requestingObject) {
	this.requestingObject = requestingObject;
    }

    @Override
    public boolean equals(Object obj) {
	if (obj == null) {
	    return false;
	}
	if (getClass() != obj.getClass()) {
	    return false;
	}
	final HighlightRequest other = (HighlightRequest) obj;
	if (this.requestingObject != other.requestingObject && (this.requestingObject == null || !this.requestingObject.equals(other.requestingObject))) {
	    return false;
	}
	if (this.highlightType != other.highlightType) {
	    return false;
	}
	return true;
    }

    @Override
    public int hashCode() {
	int hash = 7;
	hash = 89 * hash + (this.requestingObject != null ? this.requestingObject.hashCode() : 0);
	hash = 89 * hash + (this.highlightType != null ? this.highlightType.hashCode() : 0);
	return hash;
    }
}
